package com.example.xd.default_call.fragment

import com.example.xd.default_call.Global_Val.Companion.CALL_IN
import com.example.xd.default_call.Global_Val.Companion.CALL_OUT
import com.example.xd.default_call.Global_Val.Companion.CALL_VIDEO_IN
import com.example.xd.default_call.Global_Val.Companion.CALL_VIDEO_OUT
import com.example.xd.default_call.Global_Val.Companion.MULT_CALL_IN

/**
 * @auther XuDan on 2020/8/13.
 */
object FragmentFactory {
    private lateinit var fg: BaseFragment
    fun getFragment(tag: String): BaseFragment {
        when (tag) {
            CALL_IN -> {
                fg = Call_In_Fragment()
            }
            CALL_OUT -> {
                fg = Call_Out_Fragment()
            }
            CALL_VIDEO_IN -> {
                fg = Call_Video_In_Fragment()
            }
            CALL_VIDEO_OUT -> {
                fg = Call_Video_Out_Fragment()
            }
            MULT_CALL_IN -> {
                fg = MultCall_In_Fragment()
            }
        }
        return fg

    }
}